package com.kaili.basic.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.kaili.basic.pojo.dto.BaseDriverLikeDTO;
import com.kaili.basic.pojo.entity.BaseDriver;
import com.kaili.basic.pojo.vo.BaseDriverVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  BaseDriverMapper 接口
 * </p>
 *
 * @author fzj
 * @since 2018-04-25
 */
@Mapper
public interface BaseDriverMapper extends BaseMapper<BaseDriver> {

    //新增驾驶员
    int addBaseDriver(BaseDriver baseDriver);

    //修改驾驶员资料
    int updateBaseDriver(BaseDriver baseDriver);

    //删除驾驶员资料
    int deleteBaseDriver(BaseDriver baseDriver);

    //根据查询条件分页查询驾驶员资料
    List<BaseDriver> getBaseDriverByKeywords(Pagination page, BaseDriver baseDriver);

    //根据查询条件查询驾驶员资料
    BaseDriver getBaseDriverByKeywords1(BaseDriver baseDriver);

    //根据条件模糊查询驾驶员名字等数据
    List<BaseDriverVO> getBaseDriver(BaseDriverLikeDTO driverLikeDTO);

    BaseDriver getBaseDriverByKeywords2(BaseDriver baseDriver);

    Integer getDriverId();

    String getMaxDriverCode();

    List<BaseDriver> selectBaseDriverByName(@Param("name") String name);
}
